package com.itheima.reggie.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.reggie.mapper.UserMapper;
import com.itheima.reggie.pojo.User;
import com.itheima.reggie.service.UserService;
import com.itheima.reggie.utils.SendSms;
import com.itheima.reggie.utils.ValidateCodeUtils;
import org.springframework.stereotype.Service;

import java.util.Random;

/**
 * Created by ZhaoJun on 2021/11/27 15:46
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Override
    public String sendMsg(String phone) {
//        Random random = new Random();
//        Integer i = ValidateCodeUtils.generateValidateCode(6);
//        String checkCode = Integer.toString(i);
//        SendSms.sendMsg(phone,checkCode);
        String checkCode ="222333";

        return checkCode;


    }
}
